/*
 * Copyright 2007 Robert Hanson <iamroberthanson AT gmail.com>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hod.reservgrid.client.model;

import java.util.Date;



/**
 * @gears.table (name=Reservation, namespace=hoddatabase)
 * @gears.index (name= idReservation, fields= idReservation)
 * @gears.namedQuery (name=FindAll, sql="select :Reservation")
 * @gears.namedQuery (name=FindByRoom, sql="select :Reservation where idRoom=?")
 * @gears.namedQuery (name=FindByBed, sql="select :Reservation where idBed=?")
 * @gears.namedQuery (name=ExistsRoomReservationInDate, sql="select :Reservation where idRoom=? and dateReservation=?")
 * @gears.namedQuery (name=ExistsBedReservationInDate, sql="select :Reservation where idBed=? and dateReservation=?")
 */
public class Reservation implements GearsDataObject
{
	public static final String FIND_ALL = "FindAll";
	public static final String FIND_BY_ROOM = "FindByRoom";
	public static final String FIND_BY_BED = "FindByBed";
	public static final String EXISTS_ROOM_RESERVATION_IN_DATE = "ExistsRoomReservationInDate";
	public static final String EXISTS_BED_RESERVATION_IN_DATE = "ExistsBedReservationInDate";
    /**
     * @gears.id (length=10)
     */
    private Integer idReservation;
    /**
     * @gears.column
     */
    private String codeReservation;
	/**
     * @gears.column
     */        
    private Date dateReservation;    
    /**
     * @gears.column (references=RoomType(idRoomType))
     */    
    private Integer idRoomType;    
    /**
     * @gears.column (references=ReservationState(idReservationState))
     */    
    private Integer idReservationState;
    /**
     * @gears.column (references=Client(idClient))
     */    
    private Integer idClient;    
    /**
     * @gears.column
     */        
    private Date expiration;
    /**
     * @gears.column
     */        
    private Double beck;
    /**
     * @gears.column
     */        
    private Integer paxCount;
    /**
     * @gears.column
     */        
    private Integer dayCount;
    /**
     * @gears.column (references=Room(idRoom))
     */    
    private Integer idRoom; 
    /**
     * @gears.column (references=Bed(idBed))
     */    
    private Integer idBed;
    
    public Integer getIdReservation() {
		return idReservation;
	}
	public void setIdReservation(Integer idReservation) {
		this.idReservation = idReservation;
	}
	public Date getDateReservation() {
		return dateReservation;
	}
	public void setDateReservation(Date fecha) {
		this.dateReservation = fecha;
	}
	public Integer getIdRoomType() {
		return idRoomType;
	}
	public void setIdRoomType(Integer idRoomType) {
		this.idRoomType = idRoomType;
	}
	public Integer getIdReservationState() {
		return idReservationState;
	}
	public void setIdReservationState(Integer idReservationState) {
		this.idReservationState = idReservationState;
	}
	public Integer getIdClient() {
		return idClient;
	}
	public void setIdClient(Integer idClient) {
		this.idClient = idClient;
	}
	public Date getExpiration() {
		return expiration;
	}
	public void setExpiration(Date expiration) {
		this.expiration = expiration;
	}
	public Double getBeck() {
		return beck;
	}
	public void setBeck(Double beck) {
		this.beck = beck;
	}
	public Integer getPaxCount() {
		return paxCount;
	}
	public void setPaxCount(Integer paxCount) {
		this.paxCount = paxCount;
	}
	public Integer getDayCount() {
		return dayCount;
	}
	public void setDayCount(Integer dayCount) {
		this.dayCount = dayCount;
	}
	public void setCodeReservation(String codeReservation) {
		this.codeReservation = codeReservation;
	}
	public String getCodeReservation() {
		return codeReservation;
	}
	public void setIdRoom(Integer idRoom) {
		this.idRoom = idRoom;
	}
	public Integer getIdRoom() {
		return idRoom;
	}
	public void setIdBed(Integer idBed) {
		this.idBed = idBed;
	}
	public Integer getIdBed() {
		return idBed;
	}
                
}
